﻿using System;
using System.Data.Linq;
using System.Data.Linq.Mapping;
using System.Reflection;
using Concordia.Models.cs_Logged_Home;

namespace Concordia.Models.cs_Logged_Home
{
    public partial class cs_Logged_HomeDataContext
    {
        [Function(Name = "dbo.WEB_MSP_CS_MAIN")]
        [ResultType(typeof(WEB_SEL_CS_MAIN_ACCOUNTResult))]
        [ResultType(typeof(WEB_SEL_CS_MAIN_PAYMENTResult))]
        [ResultType(typeof(WEB_SEL_CS_MAIN_TRANSACT_HISTORYResult))]
        [ResultType(typeof(WEB_SEL_CS_MAIN_CALENDARResult))]
        public IMultipleResults WEB_MSP_CS_MAIN_MULTIPLE(
            [Parameter(Name = "LOAN_KEY", DbType = "Int")] int? lOAN_KEY,
            [Parameter(Name = "START_DATE", DbType = "DateTime")] DateTime? sTART_DATE,
            [Parameter(Name = "STOP_DATE", DbType = "DateTime")] DateTime? sTOP_DATE)
        {
            IExecuteResult result = ExecuteMethodCall(this, ((MethodInfo) (MethodBase.GetCurrentMethod())), lOAN_KEY,sTART_DATE, sTOP_DATE);
            if (result != null) return (IMultipleResults)(result.ReturnValue);
            return null;
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="lOAN_KEY"></param>
        /// <param name="sTART_DATE"></param>
        /// <param name="sTOP_DATE"></param>
        /// <param name="nOW"></param>
        /// <returns></returns>
        /// <remarks>Added manually b/c Visual Studio couldn't define the return values</remarks>
        [Function(Name = "dbo.WEB_SEL_CS_MAIN_CALENDAR")]
        public ISingleResult<WEB_SEL_CS_MAIN_PAYMENTResult> WEB_SEL_CS_MAIN_CALENDAR_MANUAL(
            [ParameterAttribute(Name = "LOAN_KEY", DbType = "Int")] int? lOAN_KEY,
            [ParameterAttribute(Name = "START_DATE", DbType = "DateTime")] DateTime? sTART_DATE,
            [ParameterAttribute(Name = "STOP_DATE", DbType = "DateTime")] DateTime? sTOP_DATE,
            [ParameterAttribute(Name = "NOW", DbType = "DateTime")] DateTime? nOW)
        {
            IExecuteResult result = ExecuteMethodCall(this, ((MethodInfo) (MethodBase.GetCurrentMethod())), lOAN_KEY,
                                                      sTART_DATE);
            if (result != null) return ((ISingleResult<WEB_SEL_CS_MAIN_PAYMENTResult>) (result.ReturnValue));
            return null;
        }

 
    }
}